<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<table width="100%">
			<tr>
				<th>ID</th>
				<th>Type</th>
				<th>Name</th>
				<th>Time Slot</th>
				<th>Active?</th>
			</tr>
			<xsl:apply-templates select="//instrument" />
		</table>
		<br />
		<a href="./AddInstrument">Add New Instrument</a>

	</xsl:template>
	<xsl:template match="instrument">
		<tr>
			<td>
				<a href="./InstrumentInfo?instrumentID={./@id}">
					<xsl:value-of select="@id" />
				</a>
			</td>
			<td>
				<a href="./InstrumentInfo?instrumentID={./@id}">
					<xsl:value-of select="type" />
				</a>
			</td>
			<td>
				<a href="./InstrumentInfo?instrumentID={./@id}">
					<xsl:value-of select="name" />
				</a>
			</td>
			<td>
				<a href="./InstrumentInfo?instrumentID={./@id}">
					<xsl:value-of select="timeslot" />
					min
				</a>
			</td>
			<td>
				<a href="./InstrumentInfo?instrumentID={./@id}">
					<xsl:choose>
						<xsl:when test="./isActive=1">
							Yes
						</xsl:when>
						<xsl:otherwise>
							No
						</xsl:otherwise>
					</xsl:choose>
				</a>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>